<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets"> 

<body> 
  <!-- infos moniteur -->
  <h:form>
    
     <p:panel id="infosPanel" toggleable="true" styleClass="panelForm" 
              header="#{msg['ajouter.moniteur.form.title']}">
	          
		      <p:panelGrid id="infosGrid" columns="2" styleClass="centered" columnClasses="column1,column2">
              
                  <h:outputText  value="#{msg['moniteur.nom']}" />
                  <h:column>
		            <p:inputText  id="nom" required="true" label="Nom"
		                          value="#{moniteurController.moniteur.nom}"></p:inputText>
		            <span style="padding: 0px;margin: 0px;color: red;font-size: 10">* </span> 
                  </h:column>
		          
		          <h:outputText  value="#{msg['moniteur.prenom']}" />
		          <h:column>
		            <p:inputText id="prenom" required="true" label="prenom"
		                         value="#{moniteurController.moniteur.prenom}"></p:inputText>
		             <span style="padding: 0px;margin: 0px;color: red;font-size: 10">*</span>
		          </h:column>
		          
		         <h:outputText  value="#{msg['moniteur.phone']}" />
		         <h:column>
		           <p:inputText id="phone" required="true" label="#{msg['moniteur.phone']}" 
		                        value="#{moniteurController.moniteur.numTele}"></p:inputText>
		           <span style="padding: 0px;margin: 0px;color: red;font-size: 10">*</span>
		         </h:column>
  
		      </p:panelGrid>
      <p:separator></p:separator>
      <p:commandButton value="Ajouter" id="saveBtn" icon="ui-icon-check" 
                       process="@form"
                       action="#{moniteurController.ajouterMoniteur}" update="infosGrid" />
    
	</p:panel>
	
	<p:blockUI block="infosPanel" trigger="saveBtn">  
        Loading...<br />  
        <p:graphicImage value="#{msg['images.loading.path']}"/>  
    </p:blockUI>
   </h:form>
  
   
</body> 
</html>
